<%-- 
    Document   : emailupdate
    Created on : Apr 30, 2012, 10:15:33 AM
    Author     : Ravindra
--%>

<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.Connection"%>
<%@page import="jobportal.Dbconn"%>
<%
String dest="email_text.jsp";
if(request.getParameter("page1")!=null)
    dest=request.getParameter("page1");
//out.println(dest);
RequestDispatcher rd=request.getRequestDispatcher(dest);
try{
    String id=request.getParameter("id");
    String subject=request.getParameter("subject");
    String tarea=request.getParameter("tarea");
    Connection con=Dbconn.getConn();
    Statement st=con.createStatement();
    st.executeUpdate("update emailmessage set subject='"+subject+"',content='"+tarea+"' where id='"+id+"'");

   rd.forward(request, response);
}catch(Exception e){
rd.forward(request, response);
    out.println(e);
}
%>